package com.ly.elastic.service;

import com.ly.elastic.pojo.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;
import java.util.Map;

/**
 * @Author LY
 * @create 2024/1/17 11:46
 * @Description 用户接口
 */
public interface UserService {

    void save(User user);

    void deleteById(String id);

    User queryUserById(String id);

    Iterable<User> queryAll();

    Page<User> findByName(String name, PageRequest request);

    boolean createIndex(String indexName);

    boolean deleteIndex(String indexName);

    boolean isIndexIsExists(String indexName);

    List<Map<String, Object>> search(String keyword, Integer pageIndex, Integer pageSize);

}
